package leetcode;

public class Lc3280 {

    public String convertDateToBinary(String date) {

        String[] str = date.split("-");
        Integer year = Integer.valueOf(str[0]);
        Integer month = Integer.valueOf(str[1]);
        Integer day = Integer.valueOf(str[2]);
        return Integer.toBinaryString(year) + "-" + Integer.toBinaryString(month) + "-" + Integer.toBinaryString(day) ;

    }
    private String getBinary(String s) {
        int val = Integer.valueOf(s);
        StringBuffer buffer = new StringBuffer();
        while (val != 0) {
            buffer.append(val & 1);
            val >>= 1;
        }
        return buffer.reverse().toString();
    }

    public static void main(String[] args) {
        System.out.println(Integer.parseInt("1111011", 2));
        System.out.println(Integer.toBinaryString(123));
        Integer.valueOf("22");
    }

}
